﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HtmlAgilityPack;

namespace Kooboo.HtmlFunc.Exceptions
{
    public class ParameterValueExistingException : FuncCommentNodeException
    {
        public ParameterValueExistingException(string fileName, HtmlCommentNode node, string parameterKey, string parameterValue)
            : base(fileName, node)
        {
            this.ParameterKey = parameterKey;
            this.ParameterValue = parameterValue;
        }

        public string ParameterKey
        {
            get;
            private set;
        }

        public string ParameterValue
        {
            get;
            private set;
        }

        public override string ExceptionDescription
        {
            get
            {
                return string.Format("The parameter value \"{0}\" in \"{1}\" is exisiting.", this.ParameterValue, this.ExceptionNode.Comment);
            }
        }
    }
}
